home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / ControlDefinitions.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  58.2 KB  |  1,295 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        ControlDefinitions.h
  3.  
  4.      Contains:    Definitions of controls used by Control Mgr
  5.  
  6.      Version:    Technology:    Mac OS 9
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __CONTROLDEFINITIONS__
  18. #define __CONTROLDEFINITIONS__
  19.  
  20. #ifndef __APPEARANCE__
  21.     #include <Appearance.h>
  22. #endif
  23.  
  24. #ifndef __CONTROLS__
  25.     #include <Controls.h>
  26. #endif
  27.  
  28. #ifndef __LISTS__
  29.     #include <Lists.h>
  30. #endif
  31.  
  32. #ifndef __MACHELP__
  33.     #include <MacHelp.h>
  34. #endif
  35.  
  36. #ifndef __MENUS__
  37.     #include <Menus.h>
  38. #endif
  39.  
  40.  
  41.  
  42.  
  43. #if PRAGMA_ONCE
  44. #pragma once
  45. #endif
  46.  
  47. #ifdef __cplusplus
  48. extern "C" {
  49. #endif
  50.  
  51. #if PRAGMA_IMPORT
  52. #pragma import on
  53. #endif
  54.  
  55. #if PRAGMA_STRUCT_ALIGN
  56.     #pragma options align=mac68k
  57. #elif PRAGMA_STRUCT_PACKPUSH
  58.     #pragma pack(push, 2)
  59. #elif PRAGMA_STRUCT_PACK
  60.     #pragma pack(2)
  61. #endif
  62.  
  63. /*------------------------------------------------------------------------------------------------------*/
  64. /*    o Resource Types                                                                                    */
  65. /*------------------------------------------------------------------------------------------------------*/
  66.  
  67. enum {
  68.     kControlTabListResType        = FOUR_CHAR_CODE('tab#'),        /* used for tab control (Appearance 1.0 and later)*/
  69.     kControlListDescResType        = FOUR_CHAR_CODE('ldes')        /* used for list box control (Appearance 1.0 and later)*/
  70. };
  71.  
  72. /*--------------------------------------------------------------------------------------*/
  73. /*    o Check Box Values                                                                    */
  74. /*--------------------------------------------------------------------------------------*/
  75. enum {
  76.     kControlCheckBoxUncheckedValue = 0,
  77.     kControlCheckBoxCheckedValue = 1,
  78.     kControlCheckBoxMixedValue    = 2
  79. };
  80.  
  81. /*--------------------------------------------------------------------------------------*/
  82. /*    o Radio Button Values                                                                */
  83. /*--------------------------------------------------------------------------------------*/
  84. enum {
  85.     kControlRadioButtonUncheckedValue = 0,
  86.     kControlRadioButtonCheckedValue = 1,
  87.     kControlRadioButtonMixedValue = 2
  88. };
  89.  
  90. /*--------------------------------------------------------------------------------------*/
  91. /*    o Pop-Up Menu Control Constants                                                        */
  92. /*--------------------------------------------------------------------------------------*/
  93. /* Variant codes for the System 7 pop-up menu*/
  94. enum {
  95.     popupFixedWidth                = 1 << 0,
  96.     popupVariableWidth            = 1 << 1,
  97.     popupUseAddResMenu            = 1 << 2,
  98.     popupUseWFont                = 1 << 3
  99. };
  100.  
  101. /* Menu label styles for the System 7 pop-up menu*/
  102. enum {
  103.     popupTitleBold                = 1 << 8,
  104.     popupTitleItalic            = 1 << 9,
  105.     popupTitleUnderline            = 1 << 10,
  106.     popupTitleOutline            = 1 << 11,
  107.     popupTitleShadow            = 1 << 12,
  108.     popupTitleCondense            = 1 << 13,
  109.     popupTitleExtend            = 1 << 14,
  110.     popupTitleNoStyle            = 1 << 15
  111. };
  112.  
  113. /* Menu label justifications for the System 7 pop-up menu*/
  114. enum {
  115.     popupTitleLeftJust            = 0x00000000,
  116.     popupTitleCenterJust        = 0x00000001,
  117.     popupTitleRightJust            = 0x000000FF
  118. };
  119.  
  120. /*------------------------------------------------------------------------------------------------------*/
  121. /*    o PopUp Menu Private Data Structure                                                                    */
  122. /*------------------------------------------------------------------------------------------------------*/
  123. #if !OPAQUE_TOOLBOX_STRUCTS
  124.  
  125. struct PopupPrivateData {
  126.     MenuHandle                         mHandle;
  127.     SInt16                             mID;
  128. };
  129. typedef struct PopupPrivateData            PopupPrivateData;
  130. typedef PopupPrivateData *                PopupPrivateDataPtr;
  131. typedef PopupPrivateDataPtr *            PopupPrivateDataHandle;
  132. #endif  /* !OPAQUE_TOOLBOX_STRUCTS */
  133.  
  134. /*------------------------------------------------------------------------------------------------------*/
  135. /*    o Control Definition ID's                                                                            */
  136. /*------------------------------------------------------------------------------------------------------*/
  137. /* Standard System 7 procIDs*/
  138.  
  139. enum {
  140.     pushButProc                    = 0,
  141.     checkBoxProc                = 1,
  142.     radioButProc                = 2,
  143.     scrollBarProc                = 16,
  144.     popupMenuProc                = 1008
  145. };
  146.  
  147. /*--------------------------------------------------------------------------------------*/
  148. /*    o Control Part Codes                                                                */
  149. /*--------------------------------------------------------------------------------------*/
  150. enum {
  151.     kControlLabelPart            = 1,
  152.     kControlMenuPart            = 2,
  153.     kControlTrianglePart        = 4,
  154.     kControlEditTextPart        = 5,                            /* Appearance 1.0 and later*/
  155.     kControlPicturePart            = 6,                            /* Appearance 1.0 and later*/
  156.     kControlIconPart            = 7,                            /* Appearance 1.0 and later*/
  157.     kControlClockPart            = 8,                            /* Appearance 1.0 and later*/
  158.     kControlListBoxPart            = 24,                            /* Appearance 1.0 and later*/
  159.     kControlListBoxDoubleClickPart = 25,                        /* Appearance 1.0 and later*/
  160.     kControlImageWellPart        = 26,                            /* Appearance 1.0 and later*/
  161.     kControlRadioGroupPart        = 27,                            /* Appearance 1.0.2 and later*/
  162.     kControlButtonPart            = 10,
  163.     kControlCheckBoxPart        = 11,
  164.     kControlRadioButtonPart        = 11,
  165.     kControlUpButtonPart        = 20,
  166.     kControlDownButtonPart        = 21,
  167.     kControlPageUpPart            = 22,
  168.     kControlPageDownPart        = 23,
  169.     kControlClockHourDayPart    = 9,                            /* Appearance 1.1 and later*/
  170.     kControlClockMinuteMonthPart = 10,                            /* Appearance 1.1 and later*/
  171.     kControlClockSecondYearPart    = 11,                            /* Appearance 1.1 and later*/
  172.     kControlClockAMPMPart        = 12,                            /* Appearance 1.1 and later*/
  173.     kControlDataBrowserPart        = 24,                            /* CarbonLib 1.0 and later*/
  174.     kControlDataBrowserDraggedPart = 25                            /* CarbonLib 1.0 and later*/
  175. };
  176.  
  177.  
  178.  
  179. /*------------------------------------------------------------------------------------------------------*/
  180. /*    o Control Types and ID's available only with Appearance 1.0 and later                                */
  181. /*------------------------------------------------------------------------------------------------------*/
  182. /*--------------------------------------------------------------------------------------*/
  183. /*    o BEVEL BUTTON INTERFACE (CDEF 2)                                                    */
  184. /*--------------------------------------------------------------------------------------*/
  185. /*    Bevel buttons allow you to control the content type (pict/icon/etc.), the behavior    */
  186. /* (pushbutton/toggle/sticky), and the bevel size. You also have the option of            */
  187. /*    attaching a menu to it. When a menu is present, you can specify which way the         */
  188. /*    popup arrow is facing (down or right).                                                */
  189. /*                                                                                        */
  190. /*    This is all made possible by overloading the Min, Max, and Value parameters for the    */
  191. /*    control, as well as adjusting the variant. Here's the breakdown of what goes where:    */
  192. /*                                                                                        */
  193. /*    Parameter                    What Goes Here                                            */
  194. /*    -------------------            ----------------------------------------------------    */
  195. /*    Min                            Hi Byte = Behavior, Lo Byte = content type.                */
  196. /*    Max                            ResID for resource-based content types.                    */
  197. /*    Value                        MenuID to attach, 0 = no menu, please.                    */
  198. /*                                                                                        */
  199. /*    The variant is broken down into two halfs. The low 2 bits control the bevel type.    */
  200. /*    Bit 2 controls the popup arrow direction (if a menu is present) and bit 3 controls    */
  201. /*    whether or not to use the control's owning window's font.                            */
  202. /*                                                                                        */
  203. /*    Constants for all you need to put this together are below. The values for behaviors    */
  204. /*    are set up so that you can simply add them to the content type and pass them into    */
  205. /*    the Min parameter of NewControl.                                                    */
  206. /*                                                                                        */
  207. /*    An example call:                                                                    */
  208. /*                                                                                        */
  209. /*    control = NewControl( window, &bounds, "\p", true, 0, kContentIconSuiteRes +         */
  210. /*                            kBehaviorToggles, myIconSuiteID, bevelButtonSmallBevelProc,    */
  211. /*                            0L );                                                        */
  212. /*                                                                                        */
  213. /*    Attaching a menu:                                                                    */
  214. /*                                                                                        */
  215. /*    control = NewControl( window, &bounds, "\p", true, kMyMenuID, kContentIconSuiteRes,    */
  216. /*            myIconSuiteID, bevelButtonSmallBevelProc + kBevelButtonMenuOnRight, 0L );    */
  217. /*                                                                                        */
  218. /*    This will attach menu ID kMyMenuID to the button, with the popup arrow facing right.*/
  219. /*    This also puts the menu up to the right of the button. You can also specify that a    */
  220. /*    menu can have multiple items checked at once by adding kBehaviorMultiValueMenus        */
  221. /*    into the Min parameter. If you do use multivalue menus, the GetBevelButtonMenuValue    */
  222. /*    helper function will return the last item chosen from the menu, whether or not it    */
  223. /*    was checked.                                                                        */
  224. /*                                                                                        */
  225. /*    NOTE:     Bevel buttons with menus actually have *two* values. The value of the         */
  226. /*            button (on/off), and the value of the menu. The menu value can be gotten    */
  227. /*            with the GetBevelButtonMenuValue helper function.                            */
  228. /*                                                                                        */
  229. /*    Handle-based Content                                                                */
  230. /*    --------------------                                                                */
  231. /*    You can create your control and then set the content to an existing handle to an    */
  232. /*    icon suite, etc. using the macros below. Please keep in mind that resource-based    */
  233. /*    content is owned by the control, handle-based content is owned by you. The CDEF will*/
  234. /*    not try to dispose of handle-based content. If you are changing the content type of    */
  235. /*    the button on the fly, you must make sure that if you are replacing a handle-        */
  236. /*    based content with a resource-based content to properly dispose of the handle,        */
  237. /*    else a memory leak will ensue.                                                        */
  238. /*                                                                                        */
  239. /* Bevel Button Proc IDs */
  240. enum {
  241.     kControlBevelButtonSmallBevelProc = 32,
  242.     kControlBevelButtonNormalBevelProc = 33,
  243.     kControlBevelButtonLargeBevelProc = 34
  244. };
  245.  
  246. /* Add these variant codes to kBevelButtonSmallBevelProc to change the type of button */
  247. enum {
  248.     kControlBevelButtonSmallBevelVariant = 0,
  249.     kControlBevelButtonNormalBevelVariant = (1 << 0),
  250.     kControlBevelButtonLargeBevelVariant = (1 << 1),
  251.     kControlBevelButtonMenuOnRightVariant = (1 << 2)
  252. };
  253.  
  254. /* Bevel Thicknesses */
  255.  
  256. typedef UInt16 ControlBevelThickness;
  257. enum {
  258.     kControlBevelButtonSmallBevel = 0,
  259.     kControlBevelButtonNormalBevel = 1,
  260.     kControlBevelButtonLargeBevel = 2
  261. };
  262.  
  263. /* Behaviors of bevel buttons. These are set up so you can add    */
  264. /* them together with the content types.                        */
  265. enum {
  266.     kControlBehaviorPushbutton    = 0,
  267.     kControlBehaviorToggles        = 0x0100,
  268.     kControlBehaviorSticky        = 0x0200,
  269.     kControlBehaviorSingleValueMenu = 0,
  270.     kControlBehaviorMultiValueMenu = 0x4000,                    /* only makes sense when a menu is attached.*/
  271.     kControlBehaviorOffsetContents = 0x8000
  272. };
  273.  
  274. /* Behaviors for 1.0.1 or later */
  275. enum {
  276.     kControlBehaviorCommandMenu    = 0x2000                        /* menu holds commands, not choices. Overrides multi-value bit.*/
  277. };
  278.  
  279.  
  280. typedef UInt16                             ControlBevelButtonBehavior;
  281. typedef UInt16                             ControlBevelButtonMenuBehavior;
  282. /* Bevel Button Menu Placements */
  283.  
  284. typedef UInt16 ControlBevelButtonMenuPlacement;
  285. enum {
  286.     kControlBevelButtonMenuOnBottom = 0,
  287.     kControlBevelButtonMenuOnRight = (1 << 2)
  288. };
  289.  
  290.  
  291. /* Graphic Alignments */
  292.  
  293. typedef SInt16 ControlButtonGraphicAlignment;
  294. enum {
  295.     kControlBevelButtonAlignSysDirection = -1,                    /* only left or right*/
  296.     kControlBevelButtonAlignCenter = 0,
  297.     kControlBevelButtonAlignLeft = 1,
  298.     kControlBevelButtonAlignRight = 2,
  299.     kControlBevelButtonAlignTop    = 3,
  300.     kControlBevelButtonAlignBottom = 4,
  301.     kControlBevelButtonAlignTopLeft = 5,
  302.     kControlBevelButtonAlignBottomLeft = 6,
  303.     kControlBevelButtonAlignTopRight = 7,
  304.     kControlBevelButtonAlignBottomRight = 8
  305. };
  306.  
  307. /* Text Alignments */
  308.  
  309. typedef SInt16 ControlButtonTextAlignment;
  310. enum {
  311.     kControlBevelButtonAlignTextSysDirection = teFlushDefault,
  312.     kControlBevelButtonAlignTextCenter = teCenter,
  313.     kControlBevelButtonAlignTextFlushRight = teFlushRight,
  314.     kControlBevelButtonAlignTextFlushLeft = teFlushLeft
  315. };
  316.  
  317. /* Text Placements */
  318.  
  319. typedef SInt16 ControlButtonTextPlacement;
  320. enum {
  321.     kControlBevelButtonPlaceSysDirection = -1,                    /* if graphic on right, then on left*/
  322.     kControlBevelButtonPlaceNormally = 0,
  323.     kControlBevelButtonPlaceToRightOfGraphic = 1,
  324.     kControlBevelButtonPlaceToLeftOfGraphic = 2,
  325.     kControlBevelButtonPlaceBelowGraphic = 3,
  326.     kControlBevelButtonPlaceAboveGraphic = 4
  327. };
  328.  
  329.  
  330. /* Data tags supported by the bevel button controls */
  331. enum {
  332.     kControlBevelButtonContentTag = FOUR_CHAR_CODE('cont'),        /* ButtonContentInfo*/
  333.     kControlBevelButtonTransformTag = FOUR_CHAR_CODE('tran'),    /* IconTransformType*/
  334.     kControlBevelButtonTextAlignTag = FOUR_CHAR_CODE('tali'),    /* ButtonTextAlignment*/
  335.     kControlBevelButtonTextOffsetTag = FOUR_CHAR_CODE('toff'),    /* SInt16*/
  336.     kControlBevelButtonGraphicAlignTag = FOUR_CHAR_CODE('gali'), /* ButtonGraphicAlignment*/
  337.     kControlBevelButtonGraphicOffsetTag = FOUR_CHAR_CODE('goff'), /* Point*/
  338.     kControlBevelButtonTextPlaceTag = FOUR_CHAR_CODE('tplc'),    /* ButtonTextPlacement*/
  339.     kControlBevelButtonMenuValueTag = FOUR_CHAR_CODE('mval'),    /* SInt16*/
  340.     kControlBevelButtonMenuHandleTag = FOUR_CHAR_CODE('mhnd'),    /* MenuHandle*/
  341.     kControlBevelButtonCenterPopupGlyphTag = FOUR_CHAR_CODE('pglc') /* Boolean: true = center, false = bottom right*/
  342. };
  343.  
  344. /* These are tags in 1.0.1 or later */
  345. enum {
  346.     kControlBevelButtonLastMenuTag = FOUR_CHAR_CODE('lmnu'),    /* SInt16: menuID of last menu item selected from*/
  347.     kControlBevelButtonMenuDelayTag = FOUR_CHAR_CODE('mdly')    /* SInt32: ticks to delay before menu appears*/
  348. };
  349.  
  350. /* tags available with Appearance 1.1 or later */
  351. enum {
  352.                                                                 /* Boolean: True = if an icon of the ideal size for*/
  353.                                                                 /* the button isn't available, scale a larger or*/
  354.                                                                 /* smaller icon to the ideal size. False = don't*/
  355.                                                                 /* scale; draw a smaller icon or clip a larger icon.*/
  356.                                                                 /* Default is false. Only applies to IconSuites and*/
  357.     kControlBevelButtonScaleIconTag = FOUR_CHAR_CODE('scal')    /* IconRefs.*/
  358. };
  359.  
  360. /* Helper routines are available only thru the shared library/glue. */
  361. EXTERN_API( OSErr )
  362. GetBevelButtonMenuValue            (ControlHandle             inButton,
  363.                                  SInt16 *                outValue);
  364.  
  365. EXTERN_API( OSErr )
  366. SetBevelButtonMenuValue            (ControlHandle             inButton,
  367.                                  SInt16                 inValue);
  368.  
  369. EXTERN_API( OSErr )
  370. GetBevelButtonMenuHandle        (ControlHandle             inButton,
  371.                                  MenuHandle *            outHandle);
  372.  
  373. EXTERN_API( OSErr )
  374. GetBevelButtonContentInfo        (ControlHandle             inButton,
  375.                                  ControlButtonContentInfoPtr  outContent);
  376.  
  377. EXTERN_API( OSErr )
  378. SetBevelButtonContentInfo        (ControlHandle             inButton,
  379.                                  ControlButtonContentInfoPtr  inContent);
  380.  
  381. EXTERN_API( OSErr )
  382. SetBevelButtonTransform            (ControlHandle             inButton,
  383.                                  IconTransformType         transform);
  384.  
  385. EXTERN_API( OSErr )
  386. SetBevelButtonGraphicAlignment    (ControlHandle             inButton,
  387.                                  ControlButtonGraphicAlignment  inAlign,
  388.                                  SInt16                 inHOffset,
  389.                                  SInt16                 inVOffset);
  390.  
  391. EXTERN_API( OSErr )
  392. SetBevelButtonTextAlignment        (ControlHandle             inButton,
  393.                                  ControlButtonTextAlignment  inAlign,
  394.                                  SInt16                 inHOffset);
  395.  
  396. EXTERN_API( OSErr )
  397. SetBevelButtonTextPlacement        (ControlHandle             inButton,
  398.                                  ControlButtonTextPlacement  inWhere);
  399.  
  400.  
  401. /*--------------------------------------------------------------------------------------*/
  402. /*    o SLIDER (CDEF 3)                                                                    */
  403. /*--------------------------------------------------------------------------------------*/
  404. /*    There are several variants that control the behavior of the slider control. Any        */
  405. /*    combination of the following three constants can be added to the basic CDEF ID        */
  406. /*    (kSliderProc).                                                                        */
  407. /*                                                                                        */
  408. /*    Variants:                                                                            */
  409. /*                                                                                        */
  410. /*        kSliderLiveFeedback         Slider does not use "ghosted" indicator when tracking.    */
  411. /*                                ActionProc is called (set via SetControlAction) as the    */
  412. /*                                indicator is dragged. The value is updated so that the    */
  413. /*                                actionproc can adjust some other property based on the    */
  414. /*                                value each time the action proc is called. If no action    */
  415. /*                                proc is installed, it reverts to the ghost indicator.    */
  416. /*                                                                                        */
  417. /*        kSliderHasTickMarks         Slider is drawn with 'tick marks'. The control            */
  418. /*                                rectangle must be large enough to accomidate the tick    */
  419. /*                                marks.                                                    */
  420. /*                                                                                        */
  421. /*        kSliderReverseDirection    Slider thumb points in opposite direction than normal.    */
  422. /*                                If the slider is vertical, the thumb will point to the    */
  423. /*                                left, if the slider is horizontal, the thumb will point    */
  424. /*                                upwards.                                                */
  425. /*                                                                                        */
  426. /*        kSliderNonDirectional    This option overrides the kSliderReverseDirection and    */
  427. /*                                kSliderHasTickMarks variants. It creates an indicator    */
  428. /*                                which is rectangular and doesn't point in any direction    */
  429. /*                                like the normal indicator does.                            */
  430. /* Slider proc ID and variants */
  431. enum {
  432.     kControlSliderProc            = 48,
  433.     kControlSliderLiveFeedback    = (1 << 0),
  434.     kControlSliderHasTickMarks    = (1 << 1),
  435.     kControlSliderReverseDirection = (1 << 2),
  436.     kControlSliderNonDirectional = (1 << 3)
  437. };
  438.  
  439. /*--------------------------------------------------------------------------------------*/
  440. /*    o DISCLOSURE TRIANGLE (CDEF 4)                                                        */
  441. /*--------------------------------------------------------------------------------------*/
  442. /*    This control can be used as either left or right facing. It can also handle its own    */
  443. /*    tracking if you wish. This means that when the 'autotoggle' variant is used, if the    */
  444. /*    user clicks the control, it's state will change automatically from open to closed    */
  445. /*    and vice-versa depending on its initial state. After a successful call to Track-    */
  446. /*     Control, you can just check the current value to see what state it was switched to.    */
  447. /* Triangle proc IDs */
  448. enum {
  449.     kControlTriangleProc        = 64,
  450.     kControlTriangleLeftFacingProc = 65,
  451.     kControlTriangleAutoToggleProc = 66,
  452.     kControlTriangleLeftFacingAutoToggleProc = 67
  453. };
  454.  
  455. /* Tagged data supported by disclosure triangles */
  456. enum {
  457.     kControlTriangleLastValueTag = FOUR_CHAR_CODE('last')        /* SInt16*/
  458. };
  459.  
  460. /* Helper routines are available only thru the shared library/glue. */
  461. EXTERN_API( OSErr )
  462. SetDisclosureTriangleLastValue    (ControlHandle             inTabControl,
  463.                                  SInt16                 inValue);
  464.  
  465. /*--------------------------------------------------------------------------------------*/
  466. /*    o PROGRESS INDICATOR (CDEF 5)                                                        */
  467. /*--------------------------------------------------------------------------------------*/
  468. /*    This CDEF implements both determinate and indeterminate progress bars. To switch,     */
  469. /*    just use SetControlData to set the indeterminate flag to make it indeterminate call    */
  470. /*    IdleControls to step thru the animation. IdleControls should be called at least        */
  471. /*    once during your event loop.                                                        */
  472. /*                                                                                        */
  473. /* Progress Bar proc IDs */
  474. enum {
  475.     kControlProgressBarProc        = 80
  476. };
  477.  
  478. /* Tagged data supported by progress bars */
  479. enum {
  480.     kControlProgressBarIndeterminateTag = FOUR_CHAR_CODE('inde') /* Boolean*/
  481. };
  482.  
  483. /*--------------------------------------------------------------------------------------*/
  484. /*    o LITTLE ARROWS (CDEF 6)                                                            */
  485. /*--------------------------------------------------------------------------------------*/
  486. /*     This control implements the little up and down arrows you'd see in the Memory        */
  487. /*    control panel for adjusting the cache size.                                         */
  488. /* Little Arrows proc IDs */
  489. enum {
  490.     kControlLittleArrowsProc    = 96
  491. };
  492.  
  493. /*--------------------------------------------------------------------------------------*/
  494. /*    o CHASING ARROWS (CDEF 7)                                                            */
  495. /*--------------------------------------------------------------------------------------*/
  496. /*    To animate this control, make sure to call IdleControls repeatedly.                    */
  497. /*                                                                                        */
  498. /* Chasing Arrows proc IDs */
  499. enum {
  500.     kControlChasingArrowsProc    = 112
  501. };
  502.  
  503. /*--------------------------------------------------------------------------------------*/
  504. /*    o TABS (CDEF 8)                                                                        */
  505. /*--------------------------------------------------------------------------------------*/
  506. /*    Tabs use an auxiliary resource (tab#) to hold tab information such as the tab name    */
  507. /*    and an icon suite ID for each tab.                                                    */
  508. /*                                                                                        */
  509. /*    The ID of the tab# resource that you wish to associate with a tab control should     */
  510. /*    be passed in as the Value parameter of the control. If you are using GetNewControl, */
  511. /*    then the Value slot in the CNTL resource should have the ID of the 'tab#' resource    */
  512. /*    on creation.                                                                        */
  513. /*                                                                                        */
  514. /*    Passing zero in for the tab# resource tells the control not to read in a tab# res.    */
  515. /*    You can then use SetControlMaximum to add tabs, followed by a call to SetControlData*/
  516. /*    with the kControlTabInfoTag, passing in a pointer to a ControlTabInfoRec. This sets    */
  517. /*     the name and optionally an icon for a tab.                                            */
  518. /* Tabs proc IDs */
  519. enum {
  520.     kControlTabLargeProc        = 128,                            /* Large tab size, north facing    */
  521.     kControlTabSmallProc        = 129,                            /* Small tab size, north facing    */
  522.     kControlTabLargeNorthProc    = 128,                            /* Large tab size, north facing    */
  523.     kControlTabSmallNorthProc    = 129,                            /* Small tab size, north facing    */
  524.     kControlTabLargeSouthProc    = 130,                            /* Large tab size, south facing    */
  525.     kControlTabSmallSouthProc    = 131,                            /* Small tab size, south facing    */
  526.     kControlTabLargeEastProc    = 132,                            /* Large tab size, east facing    */
  527.     kControlTabSmallEastProc    = 133,                            /* Small tab size, east facing    */
  528.     kControlTabLargeWestProc    = 134,                            /* Large tab size, west facing    */
  529.     kControlTabSmallWestProc    = 135                            /* Small tab size, west facing    */
  530. };
  531.  
  532. /* Tagged data supported by tabs */
  533. enum {
  534.     kControlTabContentRectTag    = FOUR_CHAR_CODE('rect'),        /* Rect*/
  535.     kControlTabEnabledFlagTag    = FOUR_CHAR_CODE('enab'),        /* Boolean*/
  536.     kControlTabFontStyleTag        = kControlFontStyleTag            /* ControlFontStyleRec*/
  537. };
  538.  
  539. /* New tags in 1.0.1 or later */
  540. enum {
  541.     kControlTabInfoTag            = FOUR_CHAR_CODE('tabi')        /* ControlTabInfoRec*/
  542. };
  543.  
  544. enum {
  545.     kControlTabInfoVersionZero    = 0
  546. };
  547.  
  548.  
  549. struct ControlTabInfoRec {
  550.     SInt16                             version;                    /* version of this structure.*/
  551.     SInt16                             iconSuiteID;                /* icon suite to use. Zero indicates no icon*/
  552.     Str255                             name;                        /* name to be displayed on the tab*/
  553. };
  554. typedef struct ControlTabInfoRec        ControlTabInfoRec;
  555. /* Helper routines are available only thru the shared library/glue. */
  556. EXTERN_API( OSErr )
  557. GetTabContentRect                (ControlHandle             inTabControl,
  558.                                  Rect *                    outContentRect);
  559.  
  560. EXTERN_API( OSErr )
  561. SetTabEnabled                    (ControlHandle             inTabControl,
  562.                                  SInt16                 inTabToHilite,
  563.                                  Boolean                 inEnabled);
  564.  
  565. /*--------------------------------------------------------------------------------------*/
  566. /*    o VISUAL SEPARATOR (CDEF 9)                                                            */
  567. /*--------------------------------------------------------------------------------------*/
  568. /*    Separator lines determine their orientation (horizontal or vertical) automatically    */
  569. /*    based on the relative height and width of their contrlRect.                            */
  570. /* Visual separator proc IDs */
  571. enum {
  572.     kControlSeparatorLineProc    = 144
  573. };
  574.  
  575. /*--------------------------------------------------------------------------------------*/
  576. /*    o GROUP BOX (CDEF 10)                                                                */
  577. /*--------------------------------------------------------------------------------------*/
  578. /*    The group box CDEF can be use in several ways. It can have no title, a text title,     */
  579. /*    a check box as the title, or a popup button as a title. There are two versions of     */
  580. /*    group boxes, primary and secondary, which look slightly different.                    */
  581. /* Group Box proc IDs */
  582. enum {
  583.     kControlGroupBoxTextTitleProc = 160,
  584.     kControlGroupBoxCheckBoxProc = 161,
  585.     kControlGroupBoxPopupButtonProc = 162,
  586.     kControlGroupBoxSecondaryTextTitleProc = 164,
  587.     kControlGroupBoxSecondaryCheckBoxProc = 165,
  588.     kControlGroupBoxSecondaryPopupButtonProc = 166
  589. };
  590.  
  591. /* Tagged data supported by group box */
  592. enum {
  593.     kControlGroupBoxMenuHandleTag = FOUR_CHAR_CODE('mhan'),        /* MenuHandle (popup title only)*/
  594.     kControlGroupBoxFontStyleTag = kControlFontStyleTag            /* ControlFontStyleRec*/
  595. };
  596.  
  597. /* tags available with Appearance 1.1 or later */
  598. enum {
  599.     kControlGroupBoxTitleRectTag = FOUR_CHAR_CODE('trec')        /* Rect. Rectangle that the title text/control is drawn in. (get only)*/
  600. };
  601.  
  602. /*--------------------------------------------------------------------------------------*/
  603. /*    o IMAGE WELL (CDEF 11)                                                                */
  604. /*--------------------------------------------------------------------------------------*/
  605. /*    Image Wells allow you to control the content type (pict/icon/etc.) shown in the     */
  606. /*    well.                                                                                */
  607. /*                                                                                        */
  608. /*    This is made possible by overloading the Min and Value parameters for the control.    */
  609. /*                                                                                        */
  610. /*    Parameter                    What Goes Here                                            */
  611. /*    -------------------            --------------------------------------------------        */
  612. /*    Min                            content type (see constants for bevel buttons)            */
  613. /*    Value                        Resource ID of content type, if resource-based.            */
  614. /*                                                                                        */
  615. /*                                                                                        */
  616. /*    Handle-based Content                                                                */
  617. /*    --------------------                                                                */
  618. /*    You can create your control and then set the content to an existing handle to an    */
  619. /*    icon suite, etc. using the macros below. Please keep in mind that resource-based    */
  620. /*    content is owned by the control, handle-based content is owned by you. The CDEF will*/
  621. /*    not try to dispose of handle-based content. If you are changing the content type of    */
  622. /*    the button on the fly, you must make sure that if you are replacing a handle-        */
  623. /*    based content with a resource-based content to properly dispose of the handle,        */
  624. /*    else a memory leak will ensue.                                                        */
  625. /*                                                                                        */
  626. /* Image Well proc IDs */
  627. enum {
  628.     kControlImageWellProc        = 176
  629. };
  630.  
  631. /* Tagged data supported by image wells */
  632. enum {
  633.     kControlImageWellContentTag    = FOUR_CHAR_CODE('cont'),        /* ButtonContentInfo*/
  634.     kControlImageWellTransformTag = FOUR_CHAR_CODE('tran')        /* IconTransformType*/
  635. };
  636.  
  637. /* Helper routines are available only thru the shared library/glue. */
  638. EXTERN_API( OSErr )
  639. GetImageWellContentInfo            (ControlHandle             inButton,
  640.                                  ControlButtonContentInfoPtr  outContent);
  641.  
  642. EXTERN_API( OSErr )
  643. SetImageWellContentInfo            (ControlHandle             inButton,
  644.                                  ControlButtonContentInfoPtr  inContent);
  645.  
  646. EXTERN_API( OSErr )
  647. SetImageWellTransform            (ControlHandle             inButton,
  648.                                  IconTransformType         inTransform);
  649.  
  650. /*--------------------------------------------------------------------------------------*/
  651. /*    o POPUP ARROW (CDEF 12)                                                                */
  652. /*--------------------------------------------------------------------------------------*/
  653. /*    The popup arrow CDEF is used to draw the small arrow normally associated with a     */
  654. /*    popup control. The arrow can point in four directions, and a small or large version */
  655. /*    can be used. This control is provided to allow clients to draw the arrow in a         */
  656. /*    normalized fashion which will take advantage of themes automatically.                */
  657. /*                                                                                        */
  658. /* Popup Arrow proc IDs */
  659. enum {
  660.     kControlPopupArrowEastProc    = 192,
  661.     kControlPopupArrowWestProc    = 193,
  662.     kControlPopupArrowNorthProc    = 194,
  663.     kControlPopupArrowSouthProc    = 195,
  664.     kControlPopupArrowSmallEastProc = 196,
  665.     kControlPopupArrowSmallWestProc = 197,
  666.     kControlPopupArrowSmallNorthProc = 198,
  667.     kControlPopupArrowSmallSouthProc = 199
  668. };
  669.  
  670. /* Popup Arrow Orientations */
  671. enum {
  672.     kControlPopupArrowOrientationEast = 0,
  673.     kControlPopupArrowOrientationWest = 1,
  674.     kControlPopupArrowOrientationNorth = 2,
  675.     kControlPopupArrowOrientationSouth = 3
  676. };
  677.  
  678.  
  679. typedef UInt16                             ControlPopupArrowOrientation;
  680. /*--------------------------------------------------------------------------------------*/
  681. /*    o PLACARD (CDEF 14)                                                                    */
  682. /*--------------------------------------------------------------------------------------*/
  683. /* Placard proc IDs */
  684. enum {
  685.     kControlPlacardProc            = 224
  686. };
  687.  
  688. /*--------------------------------------------------------------------------------------*/
  689. /*    o CLOCK (CDEF 15)                                                                    */
  690. /*--------------------------------------------------------------------------------------*/
  691. /*     NOTE:    You can specify more options in the Value paramter when creating the clock.    */
  692. /*            See below.                                                                    */
  693. /*                                                                                        */
  694. /*    NOTE:    Under Appearance 1.1, the clock control knows and returns more part codes.    */
  695. /*            The new clock-specific part codes are defined with the other control parts.    */
  696. /*            Besides these clock-specific parts, we also return kControlUpButtonPart        */
  697. /*            and kControlDownButtonPart when they hit the up and down arrows.            */
  698. /*            The new part codes give you more flexibility for focusing and hit testing.    */
  699. /*                                                                                        */
  700. /*            The original kControlClockPart is still valid. When hit testing, it means    */
  701. /*            that some non-editable area of the clock's whitespace has been clicked.        */
  702. /*            When focusing a currently unfocused clock, it changes the focus to the        */
  703. /*            first part; it is the same as passing kControlFocusNextPart. When            */
  704. /*            re-focusing a focused clock, it will not change the focus at all.            */
  705. /* Clock proc IDs */
  706. enum {
  707.     kControlClockTimeProc        = 240,
  708.     kControlClockTimeSecondsProc = 241,
  709.     kControlClockDateProc        = 242,
  710.     kControlClockMonthYearProc    = 243
  711. };
  712.  
  713. /* Clock Types */
  714.  
  715. typedef UInt16 ControlClockType;
  716. enum {
  717.     kControlClockTypeHourMinute    = 0,
  718.     kControlClockTypeHourMinuteSecond = 1,
  719.     kControlClockTypeMonthDay    = 2,
  720.     kControlClockTypeMonthDayYear = 3
  721. };
  722.  
  723. /* Clock Flags */
  724. /*     These flags can be passed into 'value' field on creation of the control.            */
  725. /*     Value is set to 0 after control is created.                                            */
  726.  
  727. typedef UInt32 ControlClockFlags;
  728. enum {
  729.     kControlClockFlagStandard    = 0,                            /* editable, non-live*/
  730.     kControlClockNoFlags        = 0,
  731.     kControlClockFlagDisplayOnly = 1,                            /* add this to become non-editable*/
  732.     kControlClockIsDisplayOnly    = 1,
  733.     kControlClockFlagLive        = 2,                            /* automatically shows current time on idle. only valid with display only.*/
  734.     kControlClockIsLive            = 2
  735. };
  736.  
  737. /* Tagged data supported by clocks */
  738. enum {
  739.     kControlClockLongDateTag    = FOUR_CHAR_CODE('date'),        /* LongDateRec*/
  740.     kControlClockFontStyleTag    = kControlFontStyleTag            /* ControlFontStyleRec*/
  741. };
  742.  
  743. /*--------------------------------------------------------------------------------------*/
  744. /*    o USER PANE (CDEF 16)                                                                */
  745. /*--------------------------------------------------------------------------------------*/
  746. /* User Pane proc IDs */
  747. enum {
  748.     kControlUserPaneProc        = 256
  749. };
  750.  
  751. /* Tagged data supported by user panes */
  752. /* Currently, they are all proc ptrs for doing things like drawing and hit testing, etc. */
  753. enum {
  754.     kControlUserItemDrawProcTag    = FOUR_CHAR_CODE('uidp'),        /* UserItemUPP*/
  755.     kControlUserPaneDrawProcTag    = FOUR_CHAR_CODE('draw'),        /* ControlUserPaneDrawingUPP*/
  756.     kControlUserPaneHitTestProcTag = FOUR_CHAR_CODE('hitt'),    /* ControlUserPaneHitTestUPP*/
  757.     kControlUserPaneTrackingProcTag = FOUR_CHAR_CODE('trak'),    /* ControlUserPaneTrackingUPP*/
  758.     kControlUserPaneIdleProcTag    = FOUR_CHAR_CODE('idle'),        /* ControlUserPaneIdleUPP*/
  759.     kControlUserPaneKeyDownProcTag = FOUR_CHAR_CODE('keyd'),    /* ControlUserPaneKeyDownUPP*/
  760.     kControlUserPaneActivateProcTag = FOUR_CHAR_CODE('acti'),    /* ControlUserPaneActivateUPP*/
  761.     kControlUserPaneFocusProcTag = FOUR_CHAR_CODE('foci'),        /* ControlUserPaneFocusUPP*/
  762.     kControlUserPaneBackgroundProcTag = FOUR_CHAR_CODE('back')    /* ControlUserPaneBackgroundUPP*/
  763. };
  764.  
  765. typedef CALLBACK_API( void , ControlUserPaneDrawProcPtr )(ControlHandle control, SInt16 part);
  766. typedef CALLBACK_API( ControlPartCode , ControlUserPaneHitTestProcPtr )(ControlHandle control, Point where);
  767. typedef CALLBACK_API( ControlPartCode , ControlUserPaneTrackingProcPtr )(ControlHandle control, Point startPt, ControlActionUPP actionProc);
  768. typedef CALLBACK_API( void , ControlUserPaneIdleProcPtr )(ControlHandle control);
  769. typedef CALLBACK_API( ControlPartCode , ControlUserPaneKeyDownProcPtr )(ControlHandle control, SInt16 keyCode, SInt16 charCode, SInt16 modifiers);
  770. typedef CALLBACK_API( void , ControlUserPaneActivateProcPtr )(ControlHandle control, Boolean activating);
  771. typedef CALLBACK_API( ControlPartCode , ControlUserPaneFocusProcPtr )(ControlHandle control, ControlFocusPart action);
  772. typedef CALLBACK_API( void , ControlUserPaneBackgroundProcPtr )(ControlHandle control, ControlBackgroundPtr info);
  773. typedef STACK_UPP_TYPE(ControlUserPaneDrawProcPtr)                 ControlUserPaneDrawUPP;
  774. typedef STACK_UPP_TYPE(ControlUserPaneHitTestProcPtr)             ControlUserPaneHitTestUPP;
  775. typedef STACK_UPP_TYPE(ControlUserPaneTrackingProcPtr)             ControlUserPaneTrackingUPP;
  776. typedef STACK_UPP_TYPE(ControlUserPaneIdleProcPtr)                 ControlUserPaneIdleUPP;
  777. typedef STACK_UPP_TYPE(ControlUserPaneKeyDownProcPtr)             ControlUserPaneKeyDownUPP;
  778. typedef STACK_UPP_TYPE(ControlUserPaneActivateProcPtr)             ControlUserPaneActivateUPP;
  779. typedef STACK_UPP_TYPE(ControlUserPaneFocusProcPtr)             ControlUserPaneFocusUPP;
  780. typedef STACK_UPP_TYPE(ControlUserPaneBackgroundProcPtr)         ControlUserPaneBackgroundUPP;
  781. #if OPAQUE_UPP_TYPES
  782.     EXTERN_API(ControlUserPaneDrawUPP)
  783.     NewControlUserPaneDrawUPP       (ControlUserPaneDrawProcPtr userRoutine);
  784.  
  785.     EXTERN_API(ControlUserPaneHitTestUPP)
  786.     NewControlUserPaneHitTestUPP    (ControlUserPaneHitTestProcPtr userRoutine);
  787.  
  788.     EXTERN_API(ControlUserPaneTrackingUPP)
  789.     NewControlUserPaneTrackingUPP    (ControlUserPaneTrackingProcPtr userRoutine);
  790.  
  791.     EXTERN_API(ControlUserPaneIdleUPP)
  792.     NewControlUserPaneIdleUPP       (ControlUserPaneIdleProcPtr userRoutine);
  793.  
  794.     EXTERN_API(ControlUserPaneKeyDownUPP)
  795.     NewControlUserPaneKeyDownUPP    (ControlUserPaneKeyDownProcPtr userRoutine);
  796.  
  797.     EXTERN_API(ControlUserPaneActivateUPP)
  798.     NewControlUserPaneActivateUPP    (ControlUserPaneActivateProcPtr userRoutine);
  799.  
  800.     EXTERN_API(ControlUserPaneFocusUPP)
  801.     NewControlUserPaneFocusUPP       (ControlUserPaneFocusProcPtr userRoutine);
  802.  
  803.     EXTERN_API(ControlUserPaneBackgroundUPP)
  804.     NewControlUserPaneBackgroundUPP    (ControlUserPaneBackgroundProcPtr userRoutine);
  805.  
  806.     EXTERN_API(void)
  807.     DisposeControlUserPaneDrawUPP    (ControlUserPaneDrawUPP userUPP);
  808.  
  809.     EXTERN_API(void)
  810.     DisposeControlUserPaneHitTestUPP    (ControlUserPaneHitTestUPP userUPP);
  811.  
  812.     EXTERN_API(void)
  813.     DisposeControlUserPaneTrackingUPP    (ControlUserPaneTrackingUPP userUPP);
  814.  
  815.     EXTERN_API(void)
  816.     DisposeControlUserPaneIdleUPP    (ControlUserPaneIdleUPP userUPP);
  817.  
  818.     EXTERN_API(void)
  819.     DisposeControlUserPaneKeyDownUPP    (ControlUserPaneKeyDownUPP userUPP);
  820.  
  821.     EXTERN_API(void)
  822.     DisposeControlUserPaneActivateUPP    (ControlUserPaneActivateUPP userUPP);
  823.  
  824.     EXTERN_API(void)
  825.     DisposeControlUserPaneFocusUPP    (ControlUserPaneFocusUPP userUPP);
  826.  
  827.     EXTERN_API(void)
  828.     DisposeControlUserPaneBackgroundUPP    (ControlUserPaneBackgroundUPP userUPP);
  829.  
  830.     EXTERN_API(void)
  831.     InvokeControlUserPaneDrawUPP    (ControlHandle            control,
  832.                                     SInt16                    part,
  833.                                     ControlUserPaneDrawUPP    userUPP);
  834.  
  835.     EXTERN_API(ControlPartCode)
  836.     InvokeControlUserPaneHitTestUPP    (ControlHandle        control,
  837.                                     Point                    where,
  838.                                     ControlUserPaneHitTestUPP userUPP);
  839.  
  840.     EXTERN_API(ControlPartCode)
  841.     InvokeControlUserPaneTrackingUPP    (ControlHandle        control,
  842.                                     Point                    startPt,
  843.                                     ControlActionUPP        actionProc,
  844.                                     ControlUserPaneTrackingUPP userUPP);
  845.  
  846.     EXTERN_API(void)
  847.     InvokeControlUserPaneIdleUPP    (ControlHandle            control,
  848.                                     ControlUserPaneIdleUPP    userUPP);
  849.  
  850.     EXTERN_API(ControlPartCode)
  851.     InvokeControlUserPaneKeyDownUPP    (ControlHandle        control,
  852.                                     SInt16                    keyCode,
  853.                                     SInt16                    charCode,
  854.                                     SInt16                    modifiers,
  855.                                     ControlUserPaneKeyDownUPP userUPP);
  856.  
  857.     EXTERN_API(void)
  858.     InvokeControlUserPaneActivateUPP    (ControlHandle        control,
  859.                                     Boolean                    activating,
  860.                                     ControlUserPaneActivateUPP userUPP);
  861.  
  862.     EXTERN_API(ControlPartCode)
  863.     InvokeControlUserPaneFocusUPP    (ControlHandle            control,
  864.                                     ControlFocusPart        action,
  865.                                     ControlUserPaneFocusUPP    userUPP);
  866.  
  867.     EXTERN_API(void)
  868.     InvokeControlUserPaneBackgroundUPP    (ControlHandle    control,
  869.                                     ControlBackgroundPtr    info,
  870.                                     ControlUserPaneBackgroundUPP userUPP);
  871.  
  872. #else
  873.     enum { uppControlUserPaneDrawProcInfo = 0x000002C0 };             /* pascal no_return_value Func(4_bytes, 2_bytes) */
  874.     enum { uppControlUserPaneHitTestProcInfo = 0x000003E0 };         /* pascal 2_bytes Func(4_bytes, 4_bytes) */
  875.     enum { uppControlUserPaneTrackingProcInfo = 0x00000FE0 };         /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  876.     enum { uppControlUserPaneIdleProcInfo = 0x000000C0 };             /* pascal no_return_value Func(4_bytes) */
  877.     enum { uppControlUserPaneKeyDownProcInfo = 0x00002AE0 };         /* pascal 2_bytes Func(4_bytes, 2_bytes, 2_bytes, 2_bytes) */
  878.     enum { uppControlUserPaneActivateProcInfo = 0x000001C0 };         /* pascal no_return_value Func(4_bytes, 1_byte) */
  879.     enum { uppControlUserPaneFocusProcInfo = 0x000002E0 };             /* pascal 2_bytes Func(4_bytes, 2_bytes) */
  880.     enum { uppControlUserPaneBackgroundProcInfo = 0x000003C0 };     /* pascal no_return_value Func(4_bytes, 4_bytes) */
  881.     #define NewControlUserPaneDrawUPP(userRoutine)                     (ControlUserPaneDrawUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlUserPaneDrawProcInfo, GetCurrentArchitecture())
  882.     #define NewControlUserPaneHitTestUPP(userRoutine)                 (ControlUserPaneHitTestUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlUserPaneHitTestProcInfo, GetCurrentArchitecture())
  883.     #define NewControlUserPaneTrackingUPP(userRoutine)                 (ControlUserPaneTrackingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlUserPaneTrackingProcInfo, GetCurrentArchitecture())
  884.     #define NewControlUserPaneIdleUPP(userRoutine)                     (ControlUserPaneIdleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlUserPaneIdleProcInfo, GetCurrentArchitecture())
  885.     #define NewControlUserPaneKeyDownUPP(userRoutine)                 (ControlUserPaneKeyDownUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlUserPaneKeyDownProcInfo, GetCurrentArchitecture())
  886.     #define NewControlUserPaneActivateUPP(userRoutine)                 (ControlUserPaneActivateUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlUserPaneActivateProcInfo, GetCurrentArchitecture())
  887.     #define NewControlUserPaneFocusUPP(userRoutine)                 (ControlUserPaneFocusUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlUserPaneFocusProcInfo, GetCurrentArchitecture())
  888.     #define NewControlUserPaneBackgroundUPP(userRoutine)             (ControlUserPaneBackgroundUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlUserPaneBackgroundProcInfo, GetCurrentArchitecture())
  889.     #define DisposeControlUserPaneDrawUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  890.     #define DisposeControlUserPaneHitTestUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  891.     #define DisposeControlUserPaneTrackingUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  892.     #define DisposeControlUserPaneIdleUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  893.     #define DisposeControlUserPaneKeyDownUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  894.     #define DisposeControlUserPaneActivateUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  895.     #define DisposeControlUserPaneFocusUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  896.     #define DisposeControlUserPaneBackgroundUPP(userUPP)             DisposeRoutineDescriptor(userUPP)
  897.     #define InvokeControlUserPaneDrawUPP(control, part, userUPP)     CALL_TWO_PARAMETER_UPP((userUPP), uppControlUserPaneDrawProcInfo, (control), (part))
  898.     #define InvokeControlUserPaneHitTestUPP(control, where, userUPP)  (ControlPartCode)CALL_TWO_PARAMETER_UPP((userUPP), uppControlUserPaneHitTestProcInfo, (control), (where))
  899.     #define InvokeControlUserPaneTrackingUPP(control, startPt, actionProc, userUPP)  (ControlPartCode)CALL_THREE_PARAMETER_UPP((userUPP), uppControlUserPaneTrackingProcInfo, (control), (startPt), (actionProc))
  900.     #define InvokeControlUserPaneIdleUPP(control, userUPP)             CALL_ONE_PARAMETER_UPP((userUPP), uppControlUserPaneIdleProcInfo, (control))
  901.     #define InvokeControlUserPaneKeyDownUPP(control, keyCode, charCode, modifiers, userUPP)  (ControlPartCode)CALL_FOUR_PARAMETER_UPP((userUPP), uppControlUserPaneKeyDownProcInfo, (control), (keyCode), (charCode), (modifiers))
  902.     #define InvokeControlUserPaneActivateUPP(control, activating, userUPP)  CALL_TWO_PARAMETER_UPP((userUPP), uppControlUserPaneActivateProcInfo, (control), (activating))
  903.     #define InvokeControlUserPaneFocusUPP(control, action, userUPP)  (ControlPartCode)CALL_TWO_PARAMETER_UPP((userUPP), uppControlUserPaneFocusProcInfo, (control), (action))
  904.     #define InvokeControlUserPaneBackgroundUPP(control, info, userUPP)  CALL_TWO_PARAMETER_UPP((userUPP), uppControlUserPaneBackgroundProcInfo, (control), (info))
  905. #endif
  906. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  907. #define NewControlUserPaneDrawProc(userRoutine)                 NewControlUserPaneDrawUPP(userRoutine)
  908. #define NewControlUserPaneHitTestProc(userRoutine)                 NewControlUserPaneHitTestUPP(userRoutine)
  909. #define NewControlUserPaneTrackingProc(userRoutine)             NewControlUserPaneTrackingUPP(userRoutine)
  910. #define NewControlUserPaneIdleProc(userRoutine)                 NewControlUserPaneIdleUPP(userRoutine)
  911. #define NewControlUserPaneKeyDownProc(userRoutine)                 NewControlUserPaneKeyDownUPP(userRoutine)
  912. #define NewControlUserPaneActivateProc(userRoutine)             NewControlUserPaneActivateUPP(userRoutine)
  913. #define NewControlUserPaneFocusProc(userRoutine)                 NewControlUserPaneFocusUPP(userRoutine)
  914. #define NewControlUserPaneBackgroundProc(userRoutine)             NewControlUserPaneBackgroundUPP(userRoutine)
  915. #define CallControlUserPaneDrawProc(userRoutine, control, part)    InvokeControlUserPaneDrawUPP(control, part, userRoutine)
  916. #define CallControlUserPaneHitTestProc(userRoutine, control, where) InvokeControlUserPaneHitTestUPP(control, where, userRoutine)
  917. #define CallControlUserPaneTrackingProc(userRoutine, control, startPt, actionProc) InvokeControlUserPaneTrackingUPP(control, startPt, actionProc, userRoutine)
  918. #define CallControlUserPaneIdleProc(userRoutine, control)        InvokeControlUserPaneIdleUPP(control, userRoutine)
  919. #define CallControlUserPaneKeyDownProc(userRoutine, control, keyCode, charCode, modifiers) InvokeControlUserPaneKeyDownUPP(control, keyCode, charCode, modifiers, userRoutine)
  920. #define CallControlUserPaneActivateProc(userRoutine, control, activating) InvokeControlUserPaneActivateUPP(control, activating, userRoutine)
  921. #define CallControlUserPaneFocusProc(userRoutine, control, action) InvokeControlUserPaneFocusUPP(control, action, userRoutine)
  922. #define CallControlUserPaneBackgroundProc(userRoutine, control, info) InvokeControlUserPaneBackgroundUPP(control, info, userRoutine)
  923. /*
  924.   ------------------------------------------------------------------------------------------
  925.       o EDIT TEXT (CDEF 17)
  926.   ------------------------------------------------------------------------------------------
  927. */
  928. /* Edit Text proc IDs */
  929. enum {
  930.     kControlEditTextProc        = 272,
  931.     kControlEditTextPasswordProc = 274
  932. };
  933.  
  934. /* proc IDs available with Appearance 1.1 or later */
  935. enum {
  936.     kControlEditTextInlineInputProc = 276                        /* Can't combine with the other variants*/
  937. };
  938.  
  939. /* Tagged data supported by edit text */
  940. enum {
  941.     kControlEditTextStyleTag    = kControlFontStyleTag,            /* ControlFontStyleRec*/
  942.     kControlEditTextTextTag        = FOUR_CHAR_CODE('text'),        /* Buffer of chars - you supply the buffer*/
  943.     kControlEditTextTEHandleTag    = FOUR_CHAR_CODE('than'),        /* The TEHandle of the text edit record*/
  944.     kControlEditTextKeyFilterTag = kControlKeyFilterTag,
  945.     kControlEditTextSelectionTag = FOUR_CHAR_CODE('sele'),        /* EditTextSelectionRec*/
  946.     kControlEditTextPasswordTag    = FOUR_CHAR_CODE('pass')        /* The clear text password text*/
  947. };
  948.  
  949. /* tags available with Appearance 1.1 or later */
  950. enum {
  951.     kControlEditTextKeyScriptBehaviorTag = FOUR_CHAR_CODE('kscr'), /* ControlKeyScriptBehavior. Defaults to "PrefersRoman" for password fields,*/
  952.                                                                 /*        or "AllowAnyScript" for non-password fields.*/
  953.     kControlEditTextLockedTag    = FOUR_CHAR_CODE('lock'),        /* Boolean. Locking disables editability.*/
  954.     kControlEditTextFixedTextTag = FOUR_CHAR_CODE('ftxt'),        /* Like the normal text tag, but fixes inline input first*/
  955.     kControlEditTextValidationProcTag = FOUR_CHAR_CODE('vali'),    /* ControlEditTextValidationUPP. Called when a key filter can't be: after cut, paste, etc.*/
  956.     kControlEditTextInlinePreUpdateProcTag = FOUR_CHAR_CODE('prup'), /* TSMTEPreUpdateUPP and TSMTEPostUpdateUpp. For use with inline input variant...*/
  957.     kControlEditTextInlinePostUpdateProcTag = FOUR_CHAR_CODE('poup') /* ...The refCon parameter will contain the ControlHandle.*/
  958. };
  959.  
  960. /* Structure for getting the edit text selection */
  961.  
  962. struct ControlEditTextSelectionRec {
  963.     SInt16                             selStart;
  964.     SInt16                             selEnd;
  965. };
  966. typedef struct ControlEditTextSelectionRec ControlEditTextSelectionRec;
  967.  
  968. typedef ControlEditTextSelectionRec *    ControlEditTextSelectionPtr;
  969. typedef CALLBACK_API( void , ControlEditTextValidationProcPtr )(ControlHandle control);
  970. typedef STACK_UPP_TYPE(ControlEditTextValidationProcPtr)         ControlEditTextValidationUPP;
  971. #if OPAQUE_UPP_TYPES
  972.     EXTERN_API(ControlEditTextValidationUPP)
  973.     NewControlEditTextValidationUPP    (ControlEditTextValidationProcPtr userRoutine);
  974.  
  975.     EXTERN_API(void)
  976.     DisposeControlEditTextValidationUPP    (ControlEditTextValidationUPP userUPP);
  977.  
  978.     EXTERN_API(void)
  979.     InvokeControlEditTextValidationUPP    (ControlHandle    control,
  980.                                     ControlEditTextValidationUPP userUPP);
  981.  
  982. #else
  983.     enum { uppControlEditTextValidationProcInfo = 0x000000C0 };     /* pascal no_return_value Func(4_bytes) */
  984.     #define NewControlEditTextValidationUPP(userRoutine)             (ControlEditTextValidationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlEditTextValidationProcInfo, GetCurrentArchitecture())
  985.     #define DisposeControlEditTextValidationUPP(userUPP)             DisposeRoutineDescriptor(userUPP)
  986.     #define InvokeControlEditTextValidationUPP(control, userUPP)     CALL_ONE_PARAMETER_UPP((userUPP), uppControlEditTextValidationProcInfo, (control))
  987. #endif
  988. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  989. #define NewControlEditTextValidationProc(userRoutine)             NewControlEditTextValidationUPP(userRoutine)
  990. #define CallControlEditTextValidationProc(userRoutine, control)    InvokeControlEditTextValidationUPP(control, userRoutine)
  991. /*--------------------------------------------------------------------------------------*/
  992. /*    o STATIC TEXT (CDEF 18)                                                                */
  993. /*--------------------------------------------------------------------------------------*/
  994. /* Static Text proc IDs */
  995. enum {
  996.     kControlStaticTextProc        = 288
  997. };
  998.  
  999. /* Tagged data supported by static text */
  1000. enum {
  1001.     kControlStaticTextStyleTag    = kControlFontStyleTag,            /* ControlFontStyleRec*/
  1002.     kControlStaticTextTextTag    = FOUR_CHAR_CODE('text'),        /* Copy of text*/
  1003.     kControlStaticTextTextHeightTag = FOUR_CHAR_CODE('thei')    /* SInt16*/
  1004. };
  1005.  
  1006. /* Tags available with appearance 1.1 or later */
  1007. enum {
  1008.     kControlStaticTextTruncTag    = FOUR_CHAR_CODE('trun')        /* TruncCode (-1 means no truncation)*/
  1009. };
  1010.  
  1011. /*--------------------------------------------------------------------------------------*/
  1012. /*    o PICTURE CONTROL (CDEF 19)                                                            */
  1013. /*--------------------------------------------------------------------------------------*/
  1014. /*    Value parameter should contain the ID of the picture you wish to display when        */
  1015. /*    creating controls of this type. If you don't want the control tracked at all, use     */
  1016. /*    the 'no track' variant.                                                                */
  1017. /* Picture control proc IDs */
  1018. enum {
  1019.     kControlPictureProc            = 304,
  1020.     kControlPictureNoTrackProc    = 305                            /* immediately returns kControlPicturePart*/
  1021. };
  1022.  
  1023. /*--------------------------------------------------------------------------------------*/
  1024. /*    o ICON CONTROL (CDEF 20)                                                            */
  1025. /*--------------------------------------------------------------------------------------*/
  1026. /*    Value parameter should contain the ID of the ICON or cicn you wish to display when    */
  1027. /*    creating controls of this type. If you don't want the control tracked at all, use     */
  1028. /*    the 'no track' variant.                                                                */
  1029. /* Icon control proc IDs */
  1030. enum {
  1031.     kControlIconProc            = 320,
  1032.     kControlIconNoTrackProc        = 321,                            /* immediately returns kControlIconPart*/
  1033.     kControlIconSuiteProc        = 322,
  1034.     kControlIconSuiteNoTrackProc = 323                            /* immediately returns kControlIconPart*/
  1035. };
  1036.  
  1037. enum {
  1038.                                                                 /* icon ref controls may have either an icon, color icon, icon suite, or icon ref.*/
  1039.                                                                 /* for data other than icon, you must set the data by passing a*/
  1040.                                                                 /* ControlButtonContentInfo to SetControlData*/
  1041.     kControlIconRefProc            = 324,
  1042.     kControlIconRefNoTrackProc    = 325                            /* immediately returns kControlIconPart*/
  1043. };
  1044.  
  1045. /* Tagged data supported by icon controls */
  1046. enum {
  1047.     kControlIconTransformTag    = FOUR_CHAR_CODE('trfm'),        /* IconTransformType*/
  1048.     kControlIconAlignmentTag    = FOUR_CHAR_CODE('algn')        /* IconAlignmentType*/
  1049. };
  1050.  
  1051. /* Tags available with appearance 1.1 or later */
  1052. enum {
  1053.     kControlIconResourceIDTag    = FOUR_CHAR_CODE('ires'),        /* SInt16 resource ID of icon to use*/
  1054.     kControlIconContentTag        = FOUR_CHAR_CODE('cont')        /* accepts a ControlButtonContentInfo*/
  1055. };
  1056.  
  1057. /*--------------------------------------------------------------------------------------*/
  1058. /*    o WINDOW HEADER (CDEF 21)                                                            */
  1059. /*--------------------------------------------------------------------------------------*/
  1060. /* Window Header proc IDs */
  1061. enum {
  1062.     kControlWindowHeaderProc    = 336,                            /* normal header*/
  1063.     kControlWindowListViewHeaderProc = 337                        /* variant for list views - no bottom line*/
  1064. };
  1065.  
  1066. /*--------------------------------------------------------------------------------------*/
  1067. /*    o LIST BOX (CDEF 22)                                                                */
  1068. /*--------------------------------------------------------------------------------------*/
  1069. /*    Lists use an auxiliary resource to define their format. The resource type used is     */
  1070. /*    'ldes' and a definition for it can be found in Appearance.r. The resource ID for     */
  1071. /*    the ldes is passed in the 'value' parameter when creating the control. You may pass */
  1072. /*    zero in value. This tells the List Box control to not use a resource. The list will */
  1073. /*    be created with default values, and will use the standard LDEF (0). You can change    */
  1074. /*    the list by getting the list handle. You can set the LDEF to use by using the tag    */
  1075. /*    below (kControlListBoxLDEFTag)                                                        */
  1076. /* List Box proc IDs */
  1077. enum {
  1078.     kControlListBoxProc            = 352,
  1079.     kControlListBoxAutoSizeProc    = 353
  1080. };
  1081.  
  1082. /* Tagged data supported by list box */
  1083. enum {
  1084.     kControlListBoxListHandleTag = FOUR_CHAR_CODE('lhan'),        /* ListHandle*/
  1085.     kControlListBoxKeyFilterTag    = kControlKeyFilterTag,            /* ControlKeyFilterUPP*/
  1086.     kControlListBoxFontStyleTag    = kControlFontStyleTag            /* ControlFontStyleRec*/
  1087. };
  1088.  
  1089. /* New tags in 1.0.1 or later */
  1090. enum {
  1091.     kControlListBoxDoubleClickTag = FOUR_CHAR_CODE('dblc'),        /* Boolean. Was last click a double-click?*/
  1092.     kControlListBoxLDEFTag        = FOUR_CHAR_CODE('ldef')        /* SInt16. ID of LDEF to use.*/
  1093. };
  1094.  
  1095. /*--------------------------------------------------------------------------------------*/
  1096. /*    o PUSH BUTTON (CDEF 23)                                                                */
  1097. /*--------------------------------------------------------------------------------------*/
  1098. /*    The new standard checkbox and radio button controls support a "mixed" value that    */
  1099. /*    indicates that the current setting contains a mixed set of on and off values. The     */
  1100. /*    control value used to display this indication is defined in Controls.h:                */
  1101. /*                                                                                        */
  1102. /*        kControlCheckBoxMixedValue = 2                                                    */
  1103. /*                                                                                        */
  1104. /*    Two new variants of the standard pushbutton have been added to the standard control    */
  1105. /*    suite that draw a color icon next to the control title. One variant draws the icon    */
  1106. /*    on the left side, the other draws it on the right side (when the system justifica-    */
  1107. /*    tion is right to left, these are reversed).                                            */
  1108. /*                                                                                        */
  1109. /*    When either of the icon pushbuttons are created, the contrlMax field of the control */
  1110. /*    record is used to determine the ID of the 'cicn' resource drawn in the pushbutton.    */
  1111. /*                                                                                        */
  1112. /*    In addition, a push button can now be told to draw with a default outline using the    */
  1113. /*    SetControlData routine with the kPushButtonDefaultTag below.                        */
  1114. /*                                                                                        */
  1115. /*    A push button may also be marked using the kControlPushButtonCancelTag. This has    */
  1116. /*    no visible representation, but does cause the button to play the CancelButton theme    */
  1117. /*    sound instead of the regular pushbutton theme sound when pressed.                    */
  1118. /*                                                                                        */
  1119. /* Theme Push Button/Check Box/Radio Button proc IDs */
  1120. enum {
  1121.     kControlPushButtonProc        = 368,
  1122.     kControlCheckBoxProc        = 369,
  1123.     kControlRadioButtonProc        = 370,
  1124.     kControlPushButLeftIconProc    = 374,                            /* Standard pushbutton with left-side icon*/
  1125.     kControlPushButRightIconProc = 375                            /* Standard pushbutton with right-side icon*/
  1126. };
  1127.  
  1128. /* Variants with Appearance 1.1 or later */
  1129. enum {
  1130.     kControlCheckBoxAutoToggleProc = 371,
  1131.     kControlRadioButtonAutoToggleProc = 372
  1132. };
  1133.  
  1134. /* Tagged data supported by standard buttons */
  1135. enum {
  1136.     kControlPushButtonDefaultTag = FOUR_CHAR_CODE('dflt'),        /* default ring flag*/
  1137.     kControlPushButtonCancelTag    = FOUR_CHAR_CODE('cncl')        /* cancel button flag (1.1 and later)*/
  1138. };
  1139.  
  1140. /*--------------------------------------------------------------------------------------*/
  1141. /*    o SCROLL BAR (CDEF 24)                                                                */
  1142. /*--------------------------------------------------------------------------------------*/
  1143. /*    This is the new Appearance scroll bar.                                                */
  1144. /*                                                                                        */
  1145. /* Theme Scroll Bar proc IDs */
  1146. enum {
  1147.     kControlScrollBarProc        = 384,                            /* normal scroll bar*/
  1148.     kControlScrollBarLiveProc    = 386                            /* live scrolling variant*/
  1149. };
  1150.  
  1151. /*--------------------------------------------------------------------------------------*/
  1152. /*    o POPUP BUTTON (CDEF 25)                                                            */
  1153. /*--------------------------------------------------------------------------------------*/
  1154. /*    This is the new Appearance Popup Button. It takes the same variants and does the     */
  1155. /*    same overloading as the previous popup menu control. There are some differences:    */
  1156. /*                                                                                        */
  1157. /*    Passing in a menu ID of -12345 causes the popup not to try and get the menu from a    */
  1158. /*    resource. Instead, you can build the menu and later stuff the menuhandle field in     */
  1159. /*    the popup data information.                                                            */
  1160. /*                                                                                        */
  1161. /*    You can pass -1 in the Max parameter to have the control calculate the width of the    */
  1162. /*    title on its own instead of guessing and then tweaking to get it right. It adds the    */
  1163. /*    appropriate amount of space between the title and the popup.                        */
  1164. /*                                                                                        */
  1165. /* Theme Popup Button proc IDs */
  1166. enum {
  1167.     kControlPopupButtonProc        = 400,
  1168.     kControlPopupFixedWidthVariant = 1 << 0,
  1169.     kControlPopupVariableWidthVariant = 1 << 1,
  1170.     kControlPopupUseAddResMenuVariant = 1 << 2,
  1171.     kControlPopupUseWFontVariant = kControlUsesOwningWindowsFontVariant
  1172. };
  1173.  
  1174. /* These tags are available in 1.0.1 or later of Appearance */
  1175. enum {
  1176.     kControlPopupButtonMenuHandleTag = FOUR_CHAR_CODE('mhan'),    /* MenuHandle*/
  1177.     kControlPopupButtonMenuIDTag = FOUR_CHAR_CODE('mnid')        /* SInt16*/
  1178. };
  1179.  
  1180. /* These tags are available in 1.1 or later of Appearance */
  1181. enum {
  1182.     kControlPopupButtonExtraHeightTag = FOUR_CHAR_CODE('exht')    /* SInt16 extra vertical whitespace within the button*/
  1183. };
  1184.  
  1185.  
  1186. /*--------------------------------------------------------------------------------------*/
  1187. /*    o RADIO GROUP (CDEF 26)                                                                */
  1188. /*--------------------------------------------------------------------------------------*/
  1189. /*    This control implements a radio group. It is an embedding control and can therefore    */
  1190. /*     only be used when a control hierarchy is established for its owning window. You        */
  1191. /*    should only embed radio buttons within it. As radio buttons are embedded into it,    */
  1192. /*    the group sets up its value, min, and max to represent the number of embedded items.*/
  1193. /*    The current value of the control is the index of the sub-control that is the current*/
  1194. /*    'on' radio button. To get the current radio button control handle, you can use the    */
  1195. /*    control manager call GetIndSubControl, passing in the value of the radio group.        */
  1196. /*                                                                                        */
  1197. /*    NOTE: This control is only available with Appearance 1.0.1.                            */
  1198. /* Radio Group Proc ID */
  1199. enum {
  1200.     kControlRadioGroupProc        = 416
  1201. };
  1202.  
  1203. /*--------------------------------------------------------------------------------------*/
  1204. /*    o SCROLL TEXT BOX (CDEF 27)                                                            */
  1205. /*--------------------------------------------------------------------------------------*/
  1206. /*    This control implements a scrolling box of (non-editable) text.    This is useful for    */
  1207. /*    credits in about boxes, etc.                                                        */
  1208. /*    The standard version of this control has a scroll bar, but the autoscrolling        */
  1209. /*    variant does not. The autoscrolling variant needs two pieces of information to        */
  1210. /*    work: delay (in ticks) before the scrolling starts, and time (in ticks) between        */
  1211. /*    scrolls. It will scroll one pixel at a time, unless changed via SetControlData.        */
  1212. /*                                                                                        */
  1213. /*    Parameter                    What Goes Here                                            */
  1214. /*    -------------------            ----------------------------------------------------    */
  1215. /*    Value                        Resource ID of 'TEXT'/'styl' content.                    */
  1216. /*    Min                            Scroll start delay (in ticks)                        .    */
  1217. /*    Max                            Delay (in ticks) between scrolls.                        */
  1218. /*                                                                                        */
  1219. /*    NOTE: This control is only available with Appearance 1.1.                            */
  1220. /* Scroll Text Box Proc IDs */
  1221. enum {
  1222.     kControlScrollTextBoxProc    = 432,
  1223.     kControlScrollTextBoxAutoScrollProc = 433
  1224. };
  1225.  
  1226. /* Tagged data supported by Scroll Text Box */
  1227. enum {
  1228.     kControlScrollTextBoxDelayBeforeAutoScrollTag = FOUR_CHAR_CODE('stdl'), /* UInt32 (ticks until autoscrolling starts)*/
  1229.     kControlScrollTextBoxDelayBetweenAutoScrollTag = FOUR_CHAR_CODE('scdl'), /* UInt32 (ticks between scrolls)*/
  1230.     kControlScrollTextBoxAutoScrollAmountTag = FOUR_CHAR_CODE('samt'), /* UInt16 (pixels per scroll) -- defaults to 1*/
  1231.     kControlScrollTextBoxContentsTag = FOUR_CHAR_CODE('tres')    /* SInt16 (resource ID of 'TEXT'/'styl') -- write only!*/
  1232. };
  1233.  
  1234. #if OLDROUTINENAMES
  1235. /*--------------------------------------------------------------------------------------*/
  1236. /*    o OLDROUTINENAMES                                                                    */
  1237. /*--------------------------------------------------------------------------------------*/
  1238. enum {
  1239.     kControlCheckboxUncheckedValue = kControlCheckBoxUncheckedValue,
  1240.     kControlCheckboxCheckedValue = kControlCheckBoxCheckedValue,
  1241.     kControlCheckboxMixedValue    = kControlCheckBoxMixedValue
  1242. };
  1243.  
  1244. enum {
  1245.     inLabel                        = kControlLabelPart,
  1246.     inMenu                        = kControlMenuPart,
  1247.     inTriangle                    = kControlTrianglePart,
  1248.     inButton                    = kControlButtonPart,
  1249.     inCheckBox                    = kControlCheckBoxPart,
  1250.     inUpButton                    = kControlUpButtonPart,
  1251.     inDownButton                = kControlDownButtonPart,
  1252.     inPageUp                    = kControlPageUpPart,
  1253.     inPageDown                    = kControlPageDownPart
  1254. };
  1255.  
  1256. enum {
  1257.     kInLabelControlPart            = kControlLabelPart,
  1258.     kInMenuControlPart            = kControlMenuPart,
  1259.     kInTriangleControlPart        = kControlTrianglePart,
  1260.     kInButtonControlPart        = kControlButtonPart,
  1261.     kInCheckBoxControlPart        = kControlCheckBoxPart,
  1262.     kInUpButtonControlPart        = kControlUpButtonPart,
  1263.     kInDownButtonControlPart    = kControlDownButtonPart,
  1264.     kInPageUpControlPart        = kControlPageUpPart,
  1265.     kInPageDownControlPart        = kControlPageDownPart
  1266. };
  1267.  
  1268.  
  1269. #endif  /* OLDROUTINENAMES */
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275. #if PRAGMA_STRUCT_ALIGN
  1276.     #pragma options align=reset
  1277. #elif PRAGMA_STRUCT_PACKPUSH
  1278.     #pragma pack(pop)
  1279. #elif PRAGMA_STRUCT_PACK
  1280.     #pragma pack()
  1281. #endif
  1282.  
  1283. #ifdef PRAGMA_IMPORT_OFF
  1284. #pragma import off
  1285. #elif PRAGMA_IMPORT
  1286. #pragma import reset
  1287. #endif
  1288.  
  1289. #ifdef __cplusplus
  1290. }
  1291. #endif
  1292.  
  1293. #endif /* __CONTROLDEFINITIONS__ */
  1294.  
  1295.